php forum
php mysql forum
php mysql smarty
 
Topic Options
#200463 - 07/14/03 10:19 PM [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Modification Name: [6.4 and 6.5] Shop.cgi 1.0 | [6.7+] Shop.cgi 2.0

Author(s): AllenAyres

Description: Adds a page to include your cafeshops site to.

Demo: http://www.ubbdev.com/db/cgi/shop.cgi

Requirements: UBB 6.5

Download Link: http://www.ubbdev.com/ubb/upload/00000494/shop.zip

http://www.ubbdev.com/ubb/upload/00000494/shop_67.zip

Credits: Omegatron, Burak, and cal

Notes: Set the config option(s) up top (line 19-20). Upload the files to your ubb cgi folder, set permissions (shop.cgi - 755. vars - 777), and run smile
_________________________
- Allen wavey
- What Drives You?

Top
#200464 - 08/02/05 06:57 AM Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0
twslex Offline
Member

Registered: 06/13/02
Posts: 100
Any chance in updating this mod to 6.7?

Top
#200465 - 08/02/05 01:21 PM Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
hmmm... I don't think any changes will need to be made. Upload and let me know please smile
_________________________
- Allen wavey
- What Drives You?

Top
#200466 - 08/02/05 01:28 PM Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0
twslex Offline
Member

Registered: 06/13/02
Posts: 100
Quote:
Originally posted by AllenAyres:

hmmm... I don't think any changes will need to be made. Upload and let me know please smile


I was running it on my 6.5 board, on 6.7 it give loads of errors.

http://www.fgth.nl/cgibin/shop.cgi

Top
#200467 - 08/02/05 10:05 PM Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
hehe, ok. Give me until this weekend to get it updated smile
_________________________
- Allen wavey
- What Drives You?

Top
#200468 - 08/03/05 02:42 AM Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0
twslex Offline
Member

Registered: 06/13/02
Posts: 100
Did some tweaking in the file:

This one does work now:

Code:
#!/usr/bin/perl

# Shop Mod 1.0
# Released 7/14/2003 (Original released 7/14/2003)
# Adapted with permission by Allen Ayres
# Original Version by Omegatron
#
# You may not distribute this program in any manner, modified or otherwise,
# without the express, written consent from Allen Ayres. Assistance can be found at www.ubbdev.com
#

#---------------------------------- OPTIONS ----------------------------------#
#
# url         : URL to the store at cafeshops
# members_only: Allow unregistered users to shop? (0 = yes, 1 = no)
#

my %opt = (
            url => "https://vault1.secured-url.com/securespace/acatalog/index.html",
            members_only => 1,
);

#--------------------------------------------------------------------------------#

BEGIN {
	($0 =~ m!(.*)(\|/)[^/\]+!) && unshift(@INC, $1, "$1$2Modules");
	$| = 1;
};

use lib("./Modules", ".");

use strict;
use Fcntl ':flock';
use CGI qw(:standard);
use UBBCGI qw(:cgi);
use UBBCGI::Carp qw(fatalsToBrowser set_message);

BEGIN {
	do "Digest/MD5.pm";
	if (!$Digest::MD5::VERSION) {
		require Digest::Perl::MD5;
		import Digest::Perl::MD5 'md5_hex';
		} else {
			import Digest::MD5 'md5_hex';
		}
	};

use constant SEVENSEVENSEVEN => 0777;
use constant SIXSIXSIX => 0666;

use vars qw(
	$filehandle @alltheforums $poll $PNTF $pntf_cookie_data $default_style
	@allthecategories @memberslist_array %ProfileNumber %in %GotTime $vars_groups
	%vars_version_information %vars_style_reference %vars_wordlets_criterr
	%forum_recentmeta %forum_topics %todays_active_topics

	%vars_ci %vars_config $vars_graemlins %vars_misc %vars_mods %vars_cats
	%vars_registration %vars_forums %vars_styles %vars_display %vars_style
	%vars_email %vars_time %vars_search %vars_pntf %vars_pm

	%vars_wordlets %vars_wordlets_err $hf %vars_wordlets_img
	%template_html %template_match $standard_title_table

	$user_permissions $username $password %forum_thread_data
	$forum_threads $alpha_threads $session_login_dt $last_login_j $session_login_j
	$pubname $user_number @ubber @login @session $user_topic_view

	$ThisHTML $HeaderClean %FILE_CACHE %member_profile $Hiddens $direct_to $LoginWording
	$MainButtonsLine $ContactLine $TBT $TBB $Header $Footer $EmailHeader
	$show_logout $show_logout_noreg $instant_jscript $title_wording

	$ULTIMATEBB $CONTROLPANEL $trademark $trade $InfopopCopyright
	$version $version_number $masterCharset $release_j $exact_path
	$memlistopen %ULTIMATEBB %GENERIC_GLOBALS $backend $frontend
	$MainButtonsLine $ErrorString $common_header_javascript
	$board_time_format $board_date_format $vers @checkTheProfile

	@datafile $thisline @linearray $bulb $cat $cats $line $ProfileNumber
	@theprofile $name $desc $time $id $DataLine @datafile2 $count @itemarray
	@catarray @user_profile $postedby $url $last $this @tenfile $done @updated
	@tendata @ourarray $free $l $editlink $deletelink $vers $Count @profile
	$indexurl %vars_wordlets_links $siteurl $sitetitle $caturl %opt $on $off $change_url
	$special_case @special_case @cats

   %vars_wordlets_shop $q $function $action $options $shopurl
);

require "vars_config.cgi";
require "ubb_lib.cgi";

&InitImportantStuff;

&RequireCode("$vars_config{CGIPath}/ubb_lib_files.cgi");
&RequireCode("$vars_config{CGIPath}/ubb_lib_filehandler.cgi");
&RequireCode("$vars_config{CGIPath}/ubb_lib_filehandle.cgi");
&RequireVars("$vars_config{CGIPath}/vars_template_match.cgi");
&RequireCode("$vars_config{VariablesPath}/vars_display.cgi");
&RequireCode("$vars_config{VariablesPath}/vars_wordlets.cgi");
&RequireCode("$vars_config{VariablesPath}/vars_wordlets_err.cgi");
&RequireCode("$vars_config{VariablesPath}/vars_wordlets_shop.cgi");
&RequireCode("$vars_config{VariablesPath}/vars_wordlets_mods.cgi");
&RequireCode("$vars_config{VariablesPath}/vars_wordlets_calendar.cgi");

$filehandle = new UBB::FileHandler(%vars_config, "global");

$vers = "1.1 Beta";

&LoadTemplate("public_common");
%vars_style = &LoadStyleTemplate("summary_page");
&set_page_elements;

@ubber = cookie("ubber$vars_config{Cookie_Number}");
if ($ubber[0] ne '') { $username        = $ubber[0]; }
if ($ubber[1] ne '') { $password        = $ubber[1]; }
if ($ubber[2] ne '') { $pubname         = $ubber[2]; }
if ($ubber[3] ne '') { $user_topic_view = $ubber[3]; }
if ($ubber[4] ne '') { $user_number     = $ubber[4]; }

if (@ubber) {
	@checkTheProfile = &verify_id_num_2($username, $password, $user_number);
	unless ($checkTheProfile[4] =~ /Write/) {
		print header(
			-charset => "$masterCharset",
			-type    => "text/html"
		);
		&StandardHTML("User not approved");
	}
} elsif ($opt{members_only}) {
	&StandardHTML(qq!$vars_wordlets_err{not_logged_in}

 <a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=login" target="_blank">$vars_wordlets{login_now}</a> $vars_wordlets{or} <a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=agree" target="_blank">$vars_wordlets{register_title}</a>!);
}

if ($@) {
	print ("Content-type: text/htmlnn");
	print "Error including required files: $@n";
	print "Make sure these files exist, permissions are set properly, and paths are set correctly.";
 	exit;
	}
######################################################################################################

	$show_logout = qq~
<script language="Javascript" type="text/javascript">
<!--
var user_cookie = getCookie('ubber$vars_config{Cookie_Number}');
if(('' == user_cookie) &#0124;&#0124; (null == user_cookie)) {
	document.writeln('$vars_wordlets{not_logged_in}' , ' <a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=login">$vars_wordlets{login_now}</a> $vars_wordlets{or} <a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=agree">$vars_wordlets{register_link}</a>')
} else {
	var user_array=user_cookie.split("&");
	user_array[2] = unescape(user_array[2]);
	document.writeln('$vars_wordlets{hello} ', user_array[2]);
	document.writeln('[ <a title="$vars_wordlets{logout_acronym}" href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=logoff">$vars_wordlets{logout}</a> ]');
} // end else
//-->
</script>
~;

######################################################################################################

##create q
my $q = CGI->new();

NAVIGATION: {
	my %options = (
		main			=> &ShowMain,

	);
	my $action	= $q->param('action')		&#0124;&#0124; 'main';
	my $function	= $options{$action}		&#0124;&#0124; undef;

	$function ? $function->() : display_error("No such function: $action");
}

exit;


###########################################################################################

sub ShowMain{

&StartPage;

print qq(




$TBT
	<tr bgcolor="$vars_style{TableColorStrip}">
	<td valign="bottom" align="left"><font color="$vars_style{TableStripTextColor}" size="1" face="$vars_style{FontFace}"><b>&raquo; $show_logout </b></font></td>
	<td valign="bottom" align="right"><font color="$vars_style{TableStripTextColor}" size="1" face="$vars_style{FontFace}"><b><a href="$ULTIMATEBB">$vars_config{BBName}</a> &raquo; $vars_wordlets_shop{shop_name}</b></font></td>
	</tr>
	<tr>
		<td bgcolor="$vars_style{AltColumnColor1}" colspan="2">
		<iframe src="$opt{url}" width="100%" height="400">
		</iframe>
		</td>
	</tr>
	<tr bgcolor="$vars_style{AltColumnColor2}">
	<td align="center" colspan="2">
	<b><small>$vars_wordlets_shop{shop_mod} $vers - <a href="http://www.ubbdev.com" target="_blank">UBBDev.com</a></small></b>
	</td>
	</tr>
$TBB






);

&EndPage;
} #end


#############################################################################

sub StartPage{
		&LoadTemplate("public_common");
		&InitImportantStuff;
		$MainButtonsLine = &MainButtonOptions;
		&init_public_common;
		&set_page_elements;

print ("Content-type: text/htmlnn");
print <<HEAD;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
$Header
<center>

$standard_title_table
</center>


HEAD

} #end

#############################################################################

sub EndPage{
print qq($Footer);
} #end

#############################################################################


sub ShowError {
my $ErrorString = shift;
&StartPage;
print "
<center><b>Error:</b>
$ErrorString";
&EndPage;
} #end

#############################################################################

1;

Top
#200469 - 08/03/05 02:50 AM Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0
twslex Offline
Member

Registered: 06/13/02
Posts: 100
The only thing that is not correct at this moment is the main button line: calendar, im, forum home e.g.

They all point towards the same url.

I do not see how to fix this.

help?

Top
#200470 - 08/03/05 01:30 PM Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
There's some other tweaks that need to happen. I'll look at it this weekend if not before then. You might compare the top of links.cgi with this, that'll show where the issue is. I think there's a line with "tied" in it that needs to be added.
_________________________
- Allen wavey
- What Drives You?

Top
#200471 - 08/05/05 09:05 PM Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
First post updated with a zip for 6.7+ forums smile
_________________________
- Allen wavey
- What Drives You?

Top



Moderator:  Charles, Gizmo 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks